<!--
+----------------------------------------------------------------------
| 友得云客  - 开启房产营销新纪元
+----------------------------------------------------------------------
| Copyright (c) 2019~2023 优得（西安）信息科技有限公司版权所有
+----------------------------------------------------------------------
| Licensed 友得云客不是自由软件 未经允许不可移除相关版权
+----------------------------------------------------------------------
| Author: www.youdeyunke.com
+----------------------------------------------------------------------
-->
<template>
    <div class="banners-container" v-cloak>
        <empty v-if="!module.data.url">请先上传</empty>
        <video v-else :src="module.data.url" :height="heightValue" width="100%" :poster="module.data.poster"
            :controls="module.data.controls" :loop="module.data.loop" :autoplay="module.data.autoplay" :style="{
                'vertical-align': 'middle',
                'object-fit': 'fill',
            }" />

    </div>
</template>

<script>
import Empty from "./Base/Empty";
export default {
    components: {
        Empty,
    },
    data () {
        return {
            loading: false,
        };
    },
    props: {
        module: { type: Object },
    },

    watch: {},

    mounted: function () { },

    computed: {

        heightValue: function () {
            var h = this.module.height;
            if (!h) {
                return "auto";
            }
            return h.value + "px";
        },
    },

    methods: {},
};
</script>

<style scoped>
.banners-container {
    height: 100%;
    margin: 0px auto;
    position: relative;
}

.block {
    position: absolute;
    z-index: 10;
    border: 2px dashed #1989fa;
    background: rgba(200, 200, 10, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 24px;
}
</style>
